﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="SentEmailRecord.aspx.cs" Inherits="SysManage_Others_SentEmailRecord" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <link href="../../CSS/SubStyle.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="../Js/popcalendar.js"></script>
</head>
<body>
    <form id="form1" runat="server">
        <table cellpadding="0" cellspacing="0" class="topTable">
            <tr>
                <td class="topTd">
                    <asp:Label ID="lblLocation" runat="server" Text="<%$ Resources:language, Location %>"></asp:Label><img
                        alt="当前位置" src="../../Image/weizhi.gif" />>><asp:Label ID="Label1" runat="server" Text="邮件发送记录"></asp:Label><asp:Label
                            ID="Label2" runat="server" Text="<%$ Resources:language, Must1 %>"></asp:Label><font
                                color="#ff0000">*</font><asp:Label ID="Label3" runat="server" Text="<%$ Resources:language, Must2 %>"></asp:Label>
                </td>
            </tr>
        </table>
                    <fieldset>
                        <legend><font style="font-size: 12px;">
                            <asp:Label ID="lblLegend1" runat="server" Text="<%$ Resources:language, Legend1 %>"></asp:Label></font></legend>
                         <table cellpadding="0" cellspacing="0" class="topHeadTable">
                                        <tr>
                                            <td colspan="8" class="trHeadFoot">
                                            </td>
                                        </tr>
                                        <tr><td class="td5"></td>
                                            <td class="td10">
                                                <span style="color: #ff0000">*</span><asp:Label ID="Label5" runat="server" Text="类型:"></asp:Label></td>
                                            <td class="td20">
                                                <asp:DropDownList runat="server" ID="ddlType" Width="102%">
                                                    <asp:ListItem Value="-1">请选择(Please Select)</asp:ListItem>
                                                    <asp:ListItem Value="Incasement">Incasement</asp:ListItem>
                                                <asp:ListItem Value="DeliveryApply" Text="Delivery Apply"></asp:ListItem>
                                                <asp:ListItem Value="DeliveryApproved" Text="Delivery Approved"></asp:ListItem>
                                                </asp:DropDownList></td>
                                            <td class="td10">
                                                <asp:Label ID="Label9" runat="server" Text="合同号(ITT):"></asp:Label></td>
                                            <td class="td20">
                                                <asp:TextBox runat="server" CssClass="txtStyle" MaxLength="100" 
                                                    Width="100%" ID="txtContractNo"></asp:TextBox></td>
                                            <td class="td10"><asp:Label ID="Label10" runat="server" Text="合同号(Customer):"></asp:Label></td>
                                            <td class="td20">
                                                <asp:TextBox ID="txtContractNoCustomer" runat="server" CssClass="txtStyle" MaxLength="100" 
                                                   ></asp:TextBox></td><td class="td5"></td>
                                        </tr>
                                        <tr><td class="td5">&nbsp;</td>
                                            <td class="td10">
                                                <asp:Label ID="Label16" runat="server" Text="发送日期(From):"></asp:Label></td>
                                            <td class="td20">
                                                <input id="txtFromDate" class="txtStyle" name="date0"
                                                onclick="popUpCalendar(this,document.forms[0].txtFromDate,'yyyy-mm-dd')"
                                                        style="width: 100%; cursor: hand" type="text" runat="server" /></td>
                                            <td class="td10">
                                                <asp:Label ID="Label13" runat="server" Text="发送日期(To):"></asp:Label></td>
                                            <td class="td20">
                                                <input id="txtToDate" class="txtStyle" name="date"
                                                onclick="popUpCalendar(this,document.forms[0].txtToDate,'yyyy-mm-dd')"
                                                        style="width: 100%; cursor: hand" type="text" runat="server" /></td>
                                            <td class="td10">
                                                <asp:Label ID="Label12" runat="server" Text="Email_Title:"></asp:Label></td>
                                            <td class="td20">
                                                <asp:TextBox ID="txtEmailTitle" CssClass="txtStyle" runat="server" 
                                                    MaxLength="300"></asp:TextBox></td><td class="td5"></td>
                                        </tr>
                                        <tr><td class="td5"></td>
                                            <td class="td10">
                                                <asp:Label ID="Label15" runat="server" Text="Email_Content:"></asp:Label></td>
                                            <td class="td20" colspan="3">
                                                <asp:TextBox ID="txtEmailContent" CssClass="txtStyle" runat="server" MaxLength="300" 
                                                    Width="100%"></asp:TextBox></td>
                                            <td class="td10"><asp:Label ID="Label14" runat="server" Text="发件人:"></asp:Label></td><td class="td20">
                                                <asp:TextBox ID="txtUserCode" CssClass="txtStyle" runat="server" 
                                                    MaxLength="300"></asp:TextBox></td>
                                            <td class="td5"></td>
                                        </tr>
                                        <tr><td class="trHeadFoot" colspan="8"></td></tr>
                                        <tr><td class="td5">&nbsp;</td>
                                            <td class="td10">
                                                <asp:Label ID="Label17" runat="server" Text="收件人:"></asp:Label></td>
                                            <td class="td20" colspan="3">
                                                <asp:TextBox ID="txtToPerson" runat="server" CssClass="txtStyle" 
                                                    MaxLength="100" BackColor="#CCCCFF" Enabled="False" 
                                                   ></asp:TextBox>
                                            </td>
                                            <td class="td10"><asp:Label ID="Label18" runat="server" Text="DeliveryApplyNo:"></asp:Label></td><td class="td20">
                                                <asp:TextBox ID="txtDeliveryApplyNo" runat="server" CssClass="txtStyle" MaxLength="100" 
                                                   ></asp:TextBox></td>
                                            <td class="td5">&nbsp;</td>
                                        </tr>
                                        <tr><td class="trHeadFoot" colspan="8"></td></tr>
                                    </table>          
                        <div class="cmdButtonsDiv">           
                                    &nbsp;<asp:Button ID="cmdQuery" runat="server" CssClass="cmdStyle" OnClick="cmdQuery_Click"
                                        Text="<%$ Resources:hwlan, search %>" />
                                    <asp:Button ID="cmdReset" runat="server" CssClass="cmdStyle"
                                        Text="<%$ Resources:hwlan, reset %>" onclick="cmdReset_Click" />
                       </div> 
                    </fieldset>
                    <fieldset>
                        <legend><font style="font-size: 12px;">
                            <asp:Label ID="lblLegend2" runat="server" Text="<%$ Resources:language, Legend2 %>"></asp:Label></font></legend>
                        <div class="grvDiv">
                            <asp:GridView ID="Grv" runat="server" AutoGenerateColumns="False" CssClass="gvStyle"
                                AllowPaging="True" GridLines="None" PageSize="15" DataKeyNames="M_SentEmailRecordID,EmailType,StrToPerson" 
                                EnableModelValidation="False" EnableTheming="True" Width="100%" 
                                onselectedindexchanged="Grv_SelectedIndexChanged" 
                                onpageindexchanging="Grv_PageIndexChanging">
                                <HeaderStyle CssClass="gvHeader" />
                                <RowStyle CssClass="gvRow" />
                                <AlternatingRowStyle CssClass="gvAllRow" />
                                <Columns><%--, , ContractNoCust, , , , UserCode--%>
                                    <asp:TemplateField>
                                        <HeaderTemplate>
                                            NO.</HeaderTemplate>
                                        <ItemTemplate>
                                            <%#Grv.PageIndex * Grv.PageSize + Grv.Rows.Count + 1%>
                                        </ItemTemplate>
                                        <ItemStyle CssClass="gvItem" />
                                    </asp:TemplateField>
                                    <asp:BoundField DataField="ContractNoMain" HeaderText="ContractNo(ITT)">
                                        <ItemStyle CssClass="gvItem" HorizontalAlign="Left" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="DeliveryApplyNo" HeaderText="DeliveryNo">
                                        <ItemStyle CssClass="gvItem" HorizontalAlign="Left" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="EmailTypeName" HeaderText="EmailTypeName">
                                        <ItemStyle CssClass="gvItem" HorizontalAlign="Left" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="EmailSentDate" HeaderText="EmailSentDate">
                                        <ItemStyle CssClass="gvItem" HorizontalAlign="Left" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="UserName" HeaderText="发件人">
                                        <ItemStyle CssClass="gvItem" HorizontalAlign="Left" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="EmailTitle" HeaderText="EmailTitle">
                                        <ItemStyle CssClass="gvItem" HorizontalAlign="Left" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="EmailContent" HeaderText="EmailContent">
                                        <ItemStyle CssClass="gvItem" HorizontalAlign="Left" />
                                    </asp:BoundField>
                                    <asp:CommandField HeaderText="收件人" ShowSelectButton="true"
                                        SelectText="收件人">
                                        <ItemStyle CssClass="gvItem" />
                                    </asp:CommandField>
                                </Columns>
                                <PagerTemplate>
                                    <table style="width: 100%;">
                                        <tr>
                                            <td align="left">
                                                <asp:Label ID="lblTotal1" runat="server" Text="<%$ Resources:UserSqlPage, Total1 %>"></asp:Label><asp:Label
                                                    ID="lblCount" runat="server"></asp:Label><asp:Label ID="Total2" runat="server" Text="<%$ Resources:UserSqlPage, Total2 %>"></asp:Label>,<asp:Label
                                                        ID="Label5" runat="server" Text="<%$ Resources:UserSqlPage, CurrentPage1 %>"></asp:Label><asp:Label
                                                            ID="lblPageIndex" runat="server" Text='<%# ((GridView)Container.Parent.Parent).PageIndex + 1 %>' /><asp:Label
                                                                ID="Label11" runat="server" Text="<%$ Resources:UserSqlPage, CurrentPage2 %>"></asp:Label>,<asp:Label
                                                                    ID="Label3" runat="server" Text="<%$ Resources:UserSqlPage, TotalPage1 %>"></asp:Label><asp:Label
                                                                        ID="lblPageCount" runat="server" Text='<%# ((GridView)Container.Parent.Parent).PageCount  %>' /><asp:Label
                                                                            ID="Label12" runat="server" Text="<%$ Resources:UserSqlPage, TotalPage2 %>"></asp:Label>
                                                <% //首页/上一页 %>
                                                <% if (this.Grv.PageIndex <= 0)
                                                   { %>
                                                <asp:LinkButton ID="LinkButton1" runat="server" Enabled="false" Text="<%$ Resources:UserSqlPage, FirstPage %>" />&nbsp;
                                                <asp:LinkButton ID="LinkButton2" runat="server" Enabled="false" Text="<%$ Resources:UserSqlPage, PreviousPage %>" />&nbsp;
                                                <% }
                                                   else
                                                   { %>
                                                <asp:LinkButton ID="LinkButton3" runat="server" CausesValidation="False" CommandArgument="First"
                                                    CommandName="Page" Text="<%$ Resources:UserSqlPage, FirstPage %>" />&nbsp;
                                                <asp:LinkButton ID="LinkButton4" runat="server" CausesValidation="False" CommandArgument="Prev"
                                                    CommandName="Page" Text="<%$ Resources:UserSqlPage, PreviousPage %>" />&nbsp;
                                                <% } %>
                                                <% //下一页/尾页 %>
                                                <% if (this.Grv.PageIndex >= Grv.PageCount - 1)
                                                   { %>
                                                <asp:LinkButton ID="LinkButton5" runat="server" Enabled="false" Text="<%$ Resources:UserSqlPage, NextPage %>" />&nbsp;
                                                <asp:LinkButton ID="LinkButton6" runat="server" Enabled="false" Text="<%$ Resources:UserSqlPage, LastPage %>" />
                                                <% }
                                                   else
                                                   { %>
                                                <asp:LinkButton ID="LinkButton7" runat="server" CausesValidation="False" CommandArgument="Next"
                                                    CommandName="Page" Text="<%$ Resources:UserSqlPage, NextPage %>" />&nbsp;
                                                <asp:LinkButton ID="LinkButton8" runat="server" CausesValidation="False" CommandArgument="Last"
                                                    CommandName="Page" Text="<%$ Resources:UserSqlPage, LastPage %>" />
                                                <% } %>
                                                <asp:TextBox ID="txtNewPageIndex" runat="server" Text="<%# ((GridView)Container.Parent.Parent).PageIndex + 1%>"
                                                    Width="20px"></asp:TextBox>
                                                <asp:LinkButton ID="btnGo" runat="server" CausesValidation="False" CommandArgument="-1"
                                                    CommandName="NewPage" Text="<%$ Resources:UserSqlPage, PageGo %>"></asp:LinkButton>
                                            </td>
                                        </tr>
                                    </table>
                                </PagerTemplate>
                            </asp:GridView>
                        </div>
                    </fieldset>
                    <asp:HiddenField ID="HidQueryFlag" runat="server" Value="0" />             
    </form>
</body>
</html>
